<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>watch属性</title>
    <!-- 引用vue.js库 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="app">
         <!-- 输入数据会延迟到失去焦点时才绑定 -->
    <input type="text" v-model.lazy="lazyStr" /><br>
    <!-- 输入数据会自动转换为number，所以可以直接进行运算 -->
    NaN<input type="text" v-model.number="numberStr" /><br>
    <!-- 输入数据会自动去除前后空格 -->
    <input type="text" v-model.trim="trimStr" /><br>
    </div>
    <script>
         let vm = new Vue({
        el: '#app',
        data: {
            lazyStr: '',
            numberStr:'',
            trimStr:''
        }
    });
    </script>
    
</body>
</html>